package cn.bluemobi.app.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.bluemobi.app.entity.output.ControlAudit;
import cn.bluemobi.app.entity.output.SystemSetting;
import cn.bluemobi.app.mapper.SystemSettingMapper;
import cn.bluemobi.app.service.SystemSettingService;
import cn.bluemobi.common.core.dto.Dto;

/**
 * 
 * @author lvxh
 * 
 */
@Service
@Transactional
public class SystemSettingServiceImpl implements SystemSettingService {

	@Autowired
	private SystemSettingMapper systemSettingMapper;

	@Override
	public Dto<SystemSetting> findSystemSetting() {
		Dto<SystemSetting> dto = new Dto<>();
		SystemSetting systemSetting = systemSettingMapper.findSystemSetting();
		dto.setData(systemSetting);
		return dto;
	}

	@Override
	public Dto<ControlAudit> findControlAuditByVersion(String version,
			String type) {
		Dto<ControlAudit> dto = new Dto<>();
		ControlAudit controlAudit = systemSettingMapper
				.findControlAuditByVersion(version, type);
		dto.setData(controlAudit);
		return dto;
	}
}
